.class public Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b;
.super Ljava/lang/Object;
.source "CloudFont.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b$a;
    }
.end annotation


# direct methods
.method public static a(Landroid/content/Context;)Ljava/util/ArrayList;
    .locals 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            ")",
            "Ljava/util/ArrayList<",
            "Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b$a;",
            ">;"
        }
    .end annotation

    const/4 p0, 0x7

    .line 1
    invoke-static {p0}, Les/c5;->a(I)Ljava/lang/String;

    move-result-object p0

    const-string v0, "CloudFont"

    .line 2
    invoke-static {v0, p0}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 3
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    return-object v1

    .line 4
    :cond_0
    :try_start_0
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string p0, "font"

    .line 5
    invoke-virtual {v0, p0}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p0

    if-eqz p0, :cond_3

    .line 6
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_2

    const/4 v1, 0x0

    .line 7
    :goto_0
    :try_start_1
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v2

    if-ge v1, v2, :cond_2

    .line 8
    invoke-virtual {p0, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v2
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_1

    :try_start_2
    const-string v3, "name"

    .line 9
    invoke-virtual {v2, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    const-string v4, "url"

    .line 10
    invoke-virtual {v2, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const-string v5, "textSize"

    .line 11
    invoke-virtual {v2, v5}, Lorg/json/JSONObject;->getDouble(Ljava/lang/String;)D

    move-result-wide v5

    double-to-float v2, v5

    .line 12
    new-instance v5, Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b$a;

    invoke-direct {v5}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b$a;-><init>()V

    .line 13
    iput-object v3, v5, Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b$a;->a:Ljava/lang/String;

    .line 14
    iput-object v4, v5, Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b$a;->b:Ljava/lang/String;

    .line 15
    iput v2, v5, Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/b$a;->c:F

    .line 16
    invoke-virtual {v0, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_2
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_1

    :catch_0
    move-exception v2

    .line 17
    :try_start_3
    sget-boolean v3, Les/u6;->a:Z

    if-eqz v3, :cond_1

    .line 18
    invoke-virtual {v2}, Lorg/json/JSONException;->printStackTrace()V
    :try_end_3
    .catch Lorg/json/JSONException; {:try_start_3 .. :try_end_3} :catch_1

    :cond_1
    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_2
    move-object v1, v0

    goto :goto_3

    :catch_1
    move-exception p0

    move-object v1, v0

    goto :goto_2

    :catch_2
    move-exception p0

    .line 19
    :goto_2
    sget-boolean v0, Les/u6;->a:Z

    if-eqz v0, :cond_3

    .line 20
    invoke-virtual {p0}, Lorg/json/JSONException;->printStackTrace()V

    :cond_3
    :goto_3
    return-object v1
.end method
